﻿using Dapper.Contrib.Extensions;
using Pay.Model.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Model.Model
{
    [Serializable]
    [Table("order_info")]
    public class OrderInfo : BaseExplicitModel<long>
    {
        /// <summary>
        /// 商户id
        /// </summary>
        public long MerchantId { get; set; }
        /// <summary>
        /// 支付类型
        /// </summary>
        public PayType PayType { get; set; }
        /// <summary>
        /// 支付状态
        /// </summary>
        public AlipayOrderStatus PayStatus { get; set; }
        /// <summary>
        /// 交易是否完成
        /// </summary>
        public bool IsCompleted { get; set; }
        /// <summary>
        /// 订单金额
        /// </summary>
        public decimal Amount { get; set; }
        /// <summary>
        /// 需要支付的订单金额
        /// </summary>
        public decimal AmountPay { get; set; }
        /// <summary>
        /// 费率金额
        /// </summary>
        public decimal FeeAmount { get; set; }
        /// <summary>
        /// 费率比例
        /// </summary>
        public decimal FeeRate { get; set; }
        /// <summary>
        /// 商户流水号
        /// </summary>
        public string MchTradeNo { get; set; }
        /// <summary>
        /// 商户自定义参数
        /// </summary>
        public string MchParam { get; set; }
        /// <summary>
        /// 商户自定义异步回调地址
        /// </summary>
        public string MchNotifyUrl { get; set; }
        /// <summary>
        /// 商户自定义同步回调地址
        /// </summary>
        public string MchReturnUrl { get; set; }
        /// <summary>
        /// 支付宝二维码Id
        /// </summary>
        public long OrderQrcodeId { get; set; }
        /// <summary>
        /// 支付宝账号id
        /// </summary>
        public long OrderAlipayAccountId { get; set; }
        /// <summary>
        /// 该订单分配的系统账号
        /// </summary>
        public string OrderSystemAccount { get; set; }
        /// <summary>
        /// 该订单分配的支付宝账号
        /// </summary>
        public string OrderAlipayAccount { get; set; }
        /// <summary>
        /// 该订单分配的支付宝账号备注信息
        /// </summary>
        public string OrderQrcodeDes { get; set; }
        /// <summary>
        /// 该订单分配的支付宝链接
        /// </summary>
        public string OrderQrcodeUrl { get; set; }
        /// <summary>
        /// 订单过期时间
        /// </summary>
        public DateTime ExpireTime { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime LastModifyTime { get; set; }
    }
}